package com.investment.dcf;

/**
 * DCF模型参数类
 */
public class DCFParameters {
  private double discountRate; // 折现率（如WACC）
  private double growthRate; // 短期增长率
  private double terminalGrowthRate; // 永续增长率
  private int forecastYears; // 预测年数（默认5年）

  /**
   * 默认构造函数
   */
  public DCFParameters() {
    // 设置默认值
    this.discountRate = 0.1; // 默认10%
    this.growthRate = 0.05; // 默认5%
    this.terminalGrowthRate = 0.02; // 默认2%
    this.forecastYears = 5; // 默认5年
  }

  /**
   * 带参数的构造函数
   */
  public DCFParameters(double discountRate, double growthRate, double terminalGrowthRate, int forecastYears) {
    this.discountRate = discountRate;
    this.growthRate = growthRate;
    this.terminalGrowthRate = terminalGrowthRate;
    this.forecastYears = forecastYears;
  }

  // Getter和Setter方法
  public double getDiscountRate() {
    return discountRate;
  }

  public void setDiscountRate(double discountRate) {
    this.discountRate = discountRate;
  }

  public double getGrowthRate() {
    return growthRate;
  }

  public void setGrowthRate(double growthRate) {
    this.growthRate = growthRate;
  }

  public double getTerminalGrowthRate() {
    return terminalGrowthRate;
  }

  public void setTerminalGrowthRate(double terminalGrowthRate) {
    this.terminalGrowthRate = terminalGrowthRate;
  }

  public int getForecastYears() {
    return forecastYears;
  }

  public void setForecastYears(int forecastYears) {
    this.forecastYears = forecastYears;
  }

  @Override
  public String toString() {
    return "DCFParameters{" +
        "discountRate=" + discountRate +
        ", growthRate=" + growthRate +
        ", terminalGrowthRate=" + terminalGrowthRate +
        ", forecastYears=" + forecastYears +
        '}';
  }
}